//
//  MainBottomView.m
//  MyDota
//
//  Created by 濮亚军 on 15/12/2.
//  Copyright © 2015年 濮亚军. All rights reserved.
//

#import "MainBottomView.h"

@implementation MainBottomView

#pragma mark--------重写init方法--------
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        //背景
        self.bottomBgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        self.bottomBgView.backgroundColor = [UIColor blackColor];
        [self addSubview:_bottomBgView];
        
        CGFloat width = kScreenWidth / 4;
        CGFloat height = frame.size.height;
        //英雄按钮
        self.heroPieceView = [[PieceView alloc]initWithFrame:CGRectMake(0, 0, width, height) image:[UIImage imageNamed:@"hero"] title:@"英雄"];
        [self.bottomBgView addSubview:_heroPieceView];
        
        //装备按钮
        self.equipmentPieceView = [[PieceView alloc]initWithFrame:CGRectMake(width, 0, width, height) image:[UIImage imageNamed:@"equipment"] title:@"装备"];
        [self.bottomBgView addSubview:_equipmentPieceView];
        
        //视频按钮
        self.playerPieceView = [[PieceView alloc]initWithFrame:CGRectMake(2 * width, 0, width, height) image:[UIImage imageNamed:@"player"] title:@"视频"];
        [self.bottomBgView addSubview:_playerPieceView];
        
        //我的按钮
        self.minePieceView = [[PieceView alloc]initWithFrame:CGRectMake(3 * width, 0, width, height) image:[UIImage imageNamed:@"mine"] title:@"我的"];
        [self.bottomBgView addSubview:_minePieceView];
        
    }
    return self;
}


@end
